﻿@model ProjectThuCung.Models.SanPham

@{
    ViewBag.Title = "Xóa thú cưng";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<div style="margin:30px">

    <h3>@ViewBag.Message</h3>
    <fieldset>
        <legend>SanPham</legend>

        <div class="display-label">
             @Html.DisplayNameFor(model => model.TenSanPham):
            @Html.DisplayFor(model => model.TenSanPham)
        </div>
        
        <div class="display-label">
             @Html.DisplayNameFor(model => model.LoaiSanPham.TenLoaiSanPham):
            @Html.DisplayFor(model => model.LoaiSanPham.TenLoaiSanPham)
        </div>
        
        <div class="display-label">
             @Html.DisplayNameFor(model => model.XuatXu.TenXuatXu):
            @Html.DisplayFor(model => model.XuatXu.TenXuatXu)
        </div>

        <div class="display-label">
             @Html.DisplayNameFor(model => model.ThongTinThem.Giong):
            @Html.DisplayFor(model => model.ThongTinThem.Giong)
        </div>

        <div class="display-label">
             @Html.DisplayNameFor(model => model.ThongTinThem.Mau):
            @Html.DisplayFor(model => model.ThongTinThem.Mau)
        </div>

        <div class="display-label">
             @Html.DisplayNameFor(model => model.ThongTinThem.ThangTuoi):
            @Html.DisplayFor(model => model.ThongTinThem.ThangTuoi) tháng tuổi
        </div>

        <div class="display-label">
             @Html.DisplayNameFor(model => model.ThongTinThem.TrongLuong):
            @(Html.DisplayFor(model => model.ThongTinThem.TrongLuong))kg
        </div>

        <div class="display-label">
             @Html.DisplayNameFor(model => model.MoTa):
            @Html.Raw(System.Web.HttpUtility.HtmlDecode(Model.MoTa))
        </div>

        <div class="display-label">
             @Html.DisplayNameFor(model => model.HinhAnh):
            @if (Model.HinhAnh != null)
                {
                    <img alt="@Model.TenSanPham" src ="@Model.HinhAnh" height = "100" width = "100" />
                }
                else
                {
                    <img alt="đang cập nhật" src="~/Images/NoneHinhAnh.png" height = "100" width = "100" />
                }
        </div>

        <div class="display-label">
             @Html.DisplayNameFor(model => model.Gia):
            @(Html.DisplayFor(model => model.Gia))k
        </div>

        <div class="display-label">
             @Html.DisplayNameFor(model => model.SoLuong):
            @(Html.DisplayFor(model => model.SoLuong)) con
        </div>

    </fieldset>
    @if(ViewBag.CanDelete == true)
    {
        using (Html.BeginForm()) {
            <p>
                <input type="submit" value="Xóa thú cưng" />
            </p>
        }
    }
    @Html.ActionLink("Về danh sách", "Index")
</div>
